#!/usr/bin/env python3
"""
素材上传GUI启动脚本

快速启动素材上传界面
"""

import sys
import os
from pathlib import Path

# 添加项目根目录到Python路径
project_root = Path(__file__).parent
sys.path.insert(0, str(project_root))

try:
    from src.gui.material_upload_gui import MaterialUploadGUI
    
    def main():
        """主函数"""
        print("🚀 启动素材上传界面...")
        
        # 创建GUI应用
        app = MaterialUploadGUI()
        
        print("✅ 界面已启动，请在窗口中操作")
        
        # 运行GUI
        app.run()
        
        print("👋 界面已关闭")

    if __name__ == "__main__":
        main()
        
except ImportError as e:
    print(f"❌ 导入错误: {e}")
    print("\n请确保已安装所需依赖:")
    print("pip install customtkinter pillow")
    sys.exit(1)
except Exception as e:
    print(f"❌ 启动失败: {e}")
    sys.exit(1)
